package com.magic.shop.constants;

/**
 * @author zhangbo
 * @create 2024/10/9
 *
 * magic-api原生：Options
 * 重写
 */
public enum  ZbOptions {


    WRAP_REQUEST_PARAMETERS("包装请求参数到一个变量中", "wrap_request_parameter"),
    DEFAULT_DATA_SOURCE("配置默认数据源的key", "default_data_source"),
    PERMISSION("允许拥有该权限的访问", "permission"),
    ROLE("允许拥有该角色的访问", "role"),
    REQUIRE_LOGIN("该接口需要登录才允许访问", "require_login", "true"),
    REQUIRE_API_AUTH("该接口需要鉴权访问", "require_api_auth", "true"),
    ANONYMOUS("该接口需要不登录也可访问", "anonymous", "true"),
    DISABLED_UNKNOWN_PARAMETER("不接收未经定义的参数", "disabled_unknown_parameter", "true");

    private final String name;
    private final String value;
    private final String defaultValue;

    private ZbOptions(String name, String value) {
        this(name, value, (String)null);
    }

    private ZbOptions(String name, String value, String defaultValue) {
        this.name = name;
        this.value = value;
        this.defaultValue = defaultValue;
    }

    public String getName() {
        return this.name;
    }

    public String getValue() {
        return this.value;
    }

    public String getDefaultValue() {
        return this.defaultValue;
    }


}
